<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>会员权益</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui/aui.css" />
    <style>
        .aui-bar-nav {
            background: #0689FB;
        }
    </style>
</head>

<body>
    <header class="aui-bar aui-bar-nav" id="header">
        <div class="aui-pull-left aui-btn">
            <span class="aui-iconfont aui-icon-left" onclick="close_w()"></span>
        </div>
        <div class="aui-title">文章详情</div>
    </header>
</body>
<script src="../../script/api.js" charset="utf-8"></script>
<script src="../../script/common/jquery-3.3.1.min.js" charset="utf-8"></script>
<script src="../../script/common/common.js" charset="utf-8"></script>
<script src="../../script/common/config.js" charset="utf-8"></script>
<script src="../../script/common/vue.min.js" charset="utf-8"></script>
<script>
    apiready = function() {
        api.parseTapmode();
        // 初始化
        init();
    }

    function init() {
        $(".aui-title").html(api.pageParam.title);
        // 判断请求
        if (api.pageParam.url) {
            getUrlInfo();
        } else if (api.pageParam.id) {
            getIdInfo();
        }
    }

    // 接口直接请求数据
    function getUrlInfo() {
        _ajax(api.pageParam.url, {}, function(ret) {
            if (ret.code === 200) {
                openFrame(ret.data);
            }
        });
    }

    // 几口根据ID请求数据
    function getIdInfo(id) {
        ajax(Config.api.NewsDetail, {
            news_id: api.pageParam.id
        }, function(ret) {
            if (ret.code === 200) {
                openFrame(ret.data);
            }
        });
    }

    // 打开页面
    function openFrame(info) {
        var name = "arc_arc_frm";
        var url = "./arc_arc_frm.html";
        open_f(name, url, {
            info: info
        });
    }
</script>

</html>
